package controller;

import view.MainFrame;
import model.os.OS;

public class Application {
	
	private OS os;
	
	private MainFrame mainFrame;
	
	private static Application INSTANCE;
	
	public Application(){
		os = OS.getInstance();
		mainFrame = new MainFrame();
		os.register(mainFrame);
		os.createProcesses();
		os.start();
	}

	public MainFrame getMainFrame() {
		return mainFrame;
	}

	public void setMainFrame(MainFrame mainFrame) {
		this.mainFrame = mainFrame;
	}
	
	public synchronized static Application getInstance(){
		if (INSTANCE == null){
			INSTANCE = new Application();
		}
		return INSTANCE;
	}
	
}
